﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using MvcContrib.PortableAreas;

namespace Tamias.BasicCmsPortableArea.Areas.CmsAdmin
{
    public class CmsAdminAreaRegistration : PortableAreaRegistration
    {
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            RegisterRoutes(context);

            base.RegisterArea(context, bus);
        }

        public void RegisterRoutes(AreaRegistrationContext context)
        {
            context.MapRoute(
                "CmsAdmin",
                "CmsAdmin/{controller}/{action}/{id}",
                new { controller = "CmsAdmin", action = "Index", id = String.Empty, area = AreaName }
            );
        }

        public override string AreaName
        {
            get { return "CmsAdmin"; }
        }

    }
}
